<?php
class Manageaccount_Model_Account {
	
	private $updateForm;
	private $updateData;
	
	public function __construct(){
		$this->updateForm = new Manageaccount_Data_Updateform;
		$this->updateData = new Manageaccount_Data_Updatedata;
	}
	
	public function getData(array $postVars, $username){
		if(isset($postVars['realname']) && isset($postVars['email']) && isset($postVars['password'])){
			$article['content'] = $this->updateData->update($postVars, $username);
		}
		else {
			$article['content'] = '';
		}
		$article['form'] = $this->updateForm->getData($username);
		return $article;
	}
	
}